package thread;

public class Demo4 {
    public static void main(String[] args) {
        Runnable runnable = new Runnable() {
            @Override
            public void run() {
                while (true) {
                    System.out.println("Runnable");
                }
            }
        };
        Thread thread = new Thread(runnable);
        thread.start();
        while (true) {
            System.out.println("main");
        }
    }
}
